﻿namespace Digitalmes.Domain.Mes;

/// <summary>
/// 设备警报项目定义
/// </summary>
[SugarTable("equip_alarm_item", "设备警报项定义表")]
public class EquipAlarmItem : EntityBase
{
    /// <summary>
    /// 设备名称，可以为 null。
    /// </summary>
    [SugarColumn(ColumnDescription = "设备", Length = 32)]
    public string? EquipName { get; init; }

    /// <summary>
    /// 编号，从 1 开始
    /// </summary>
    [SugarColumn(ColumnDescription = "编号，从 1 开始")]
    public int Pos { get; init; }

    /// <summary>
    /// 警报内容
    /// </summary>
    [NotNull]
    [SugarColumn(ColumnDescription = "警报内容", Length = 64)]
    public string? Content { get; init; }

    /// <summary>
    /// 警报等级
    /// </summary>
    [SugarColumn(ColumnDescription = "警报等级")]
    public AlarmLevelEnum Level { get; init; }

    /// <summary>
    /// 警报分类
    /// </summary>
    [NotNull]
    [SugarColumn(ColumnDescription = "警报分类", Length = 32)]
    public string? Classify { get; init; }
}
